package com.zw.design.pattern.creational.structural.proxy.dynamicproxy;

import com.zw.design.pattern.creational.structural.proxy.IOrderService;
import com.zw.design.pattern.creational.structural.proxy.IOrderServiceImpl;
import com.zw.design.pattern.creational.structural.proxy.Order;


public class Test {
    public static void main(String[] args) {
        Order order=new Order();
        order.setUserId(1L);
        //使用动态代理
        IOrderService cs= (IOrderService) new OrderServiceDynamicProxy(new IOrderServiceImpl()).bind();
        int i = cs.saveOrder(order);
    }
}
